/* @file zipfile.h
 * @brief This file contains the declaration of the zipper class.
 *
 * This file is used for file compression.
 *
 * @author haibo.yang
 * @date 2024-02-28
 */

#pragma once

#include "record.h"
#include "zip.h"

#include <memory>
#include <vector>
#include <boost/filesystem.hpp>

namespace record {

class Zipper
{
public:
	explicit Zipper(boost::filesystem::path file);
	~Zipper ();

	Zipper (Zipper const&) = delete;
	Zipper& operator= (Zipper const&) = delete;

	int add (const std::string name, const std::string path);
	void close ();

private:
	struct zip* _zip;
	std::vector<std::shared_ptr<std::string>> _store;
};
}
